package com.usian.search.controller;

import com.usian.apis.search.SearchControllerApi;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.search.UserSearchDto;
import com.usian.search.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * ClassName: SearchController
 * Author:   WGG
 * Date:    2022-12-2022/12/10-11:15
 * Version: 1.0
 * Description:
 */
@RestController
@RequestMapping("/search/api/v1")
public class SearchController implements SearchControllerApi {

    @Autowired
    private SearchService searchService;

    @Override
    @PostMapping("/findByTitle")
    public ResponseResult findByTitle(@RequestBody UserSearchDto dto) {

        return searchService.findByTitle(dto);
    }
}
